# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kiconthemes
pkgver=5.73.0
pkgrel=0
pkgdesc="Support for icon themes"
arch="all !armhf"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only"
depends_dev="qt5-qtsvg-dev karchive-dev ki18n-dev kcoreaddons-dev kconfigwidgets-dev kwidgetsaddons-dev kitemviews-dev"
makedepends="$depends_dev extra-cmake-modules doxygen qt5-qttools-dev"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kiconthemes-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
options="!check" # 1 Test fail

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="9f9454f2c94b87ebb3d13d3b36e2626c52deb4cf23ea5d4e2e768e97dd206a66aa0692833d82aa999e566bb88d477d87bffd3f162194d76b504aa3645f6da1b0  kiconthemes-5.73.0.tar.xz"
